One or more aspects relate, in general, to multiprocessing computing environments, and in particular, to transactional processing within such computing environments, which include prefetching instructions.
In general, prefetching refers to the transfer of data from a main memory to temporary storage, in readiness for later use. In certain computer architectures, instruction prefetch is a technique used in microprocessors to speed up the execution of a program by reducing wait states. Because processors can be faster than the memory where program code is stored, meaning that the program's instructions and/or the instruction operands cannot be read fast enough to keep the processor busy, adding a cache can provide faster access to needed instructions and the data utilized by the instructions, and therefore, maximize the efficiency of the processor. Prefetching occurs when a processor requests an instruction from main memory before it is actually needed. Once the instruction comes back from memory, it is placed in a cache. When an instruction is needed, the instruction can be accessed much more quickly from the cache, than if the processor had to make a request for the instruction from memory.
In some computer architecture, although the processors employ a prefetch technique to cache instructions before they are needed, prefetch data instructions may instruct a processor (including one or more processor in a central processing unit (CPU)) to perform a cache prefetch for a particular address. However, the program code executed by the processor in these systems does not check whether prefetching the instructions actually impacted the efficiency of the system, e.g., there is no check for whether the prefetched data was actually used by the program. As a result, with limited resources, useful prefetches can be dropped in lieu of previously issued ineffective prefetches (i.e., instructions and/or data that are not utilized), leading to non-optimal performance of the system.